package cn.edu.wfu.libautobook.service.impl;

import cn.edu.wfu.libautobook.bean.Quartz;
import cn.edu.wfu.libautobook.mapper.QuartzMapper;
import cn.edu.wfu.libautobook.service.QuartzService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class QuartzServiceImpl implements QuartzService {
    @Autowired
    private QuartzMapper quartzMapper;

    @Override
    public Integer saveSchedule(Quartz quartz) {
        return quartzMapper.insert(quartz);
    }

    @Override
    public Integer remove(Integer jid) {
        return quartzMapper.deleteById(jid);
    }

    @Override
    public Integer update(Quartz quartz) {
        return quartzMapper.updateById(quartz);
    }
}
